package com.yeyks.activity.service.impl;

import cn.hutool.core.collection.CollectionUtil;
import com.yeyks.activity.dal.domain.ActivityPrizeList;
import com.yeyks.activity.dal.dao.ActivityPrizeListMapper;
import com.yeyks.activity.service.ActivityPrizeListService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * <p>
 * 奖品明细表 服务实现类
 * </p>
 *
 * @author shuai
 * @since 2019-11-28
 */
@Service
public class ActivityPrizeListServiceImpl extends ServiceImpl<ActivityPrizeListMapper, ActivityPrizeList> implements ActivityPrizeListService {

    /**
     * 批量插入
     *
     * @param activityPrizeLists
     * @return
     */
    @Override
    public Boolean insertByBatch(List<ActivityPrizeList> activityPrizeLists) {
        if (CollectionUtil.isEmpty(activityPrizeLists)) {
            return true;
        }
        return activityPrizeLists.size() == baseMapper.insertByBatch(activityPrizeLists);
    }
}
